<template>
	<view class="content">
		 <!-- 首页 -->
		 <home v-if="nowSelectData==1" />
		 <!-- 找工作 -->
		 <work v-if="nowSelectData==2" />
		 <!-- 头条 -->
		 <news v-if="nowSelectData==3" />
		 <!-- 我的 -->
		 <account v-if="nowSelectData==4" />

			<!-- 底部导航栏 -->
			<u-tabbar :value="nowSelectData" @change="btmNavChange" :fixed="true" :safeAreaInsetBottom="true">
				<u-tabbar-item text="首页" name="1" icon="home"></u-tabbar-item>
				<u-tabbar-item text="找工作" name="2" icon="grid-fill"></u-tabbar-item>
				<u-tabbar-item text="头条" name="3" icon="moments-circel-fill"></u-tabbar-item>
				<u-tabbar-item text="我的" name="4" icon="account-fill"></u-tabbar-item>
			</u-tabbar>
	</view>
</template>

<script>
import home from '@/pages/index/home.vue';
import work from '@/pages/index/work.vue';
import account from '@/pages/index/account.vue';
import news from '@/pages/index/news.vue';
	export default {
		components:{home,work,account,news},
		data() {
			return {
				
				// 当前选中的按钮
				nowSelectData:"1"
			}
		},
		onLoad() {

		},
		methods: {
			
			// 底部导航栏切换事件
			btmNavChange(data){ 
				this.nowSelectData = data;
			}
		}
	}
</script>

<style scoped>
	
</style>